﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using IHISCETeim.Library;
using System.Data;
using IHISCETeim.BLL;
using System.Text;

namespace IHISCETeim.Web.MachineSys.FTradeModel
{
    public partial class ReportHuKuanZhiPiao4EasyUI : EasyUIPageBase
    {
        protected override Permission[] PowerKey
        {
            get
            {
                return new Permission[] { Permission.查看 };
            }
        }
        protected override string DWZRef
        {
            get
            {
                return "ReportHuKuanZhiPiao4EasyUI";
            }
        }

        protected string GetTableColumTag(int monthadd)
        {
            return string.Format("({0}月到期款)",DateTime.Now.AddMonths(monthadd).ToString("MM") );
        }


        protected string GetDateFrom
        { 
            get{
                return DateTime.Now.ToString("yyyy-MM-01");
            }
        }

        protected string GetDateTo
        {
            get {
                return Convert.ToDateTime( DateTime.Now.AddMonths(1).ToString("yyyy-MM-01")).AddDays(-1).ToString("yyyy-MM-dd 23:59:59");
            }
        }

        protected override string query()
        {
            DataTableCollection dts = FTradeReportController.Report4GetReportDate(GetDateFrom, GetDateTo);


            return ToDataGridJson(dts[0], TotalCount, dts[1]).ToString();
        }
    }
}